Shader "Chromatic2D/SoftAdditive" 
{
	Properties 
	{
		_MainTex ("Base (RGB) Trans (A)", 2D) = "white" {}
		_Color ("Main Color", Color) = (1,1,1,1)
	}

	SubShader
	{
		Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
		ZWrite Off Lighting Off Cull Off Fog { Mode Off } Blend OneMinusDstColor One		
		Pass 
		{
			CGPROGRAM
			#pragma vertex vert
			#pragma fragment frag
			#include "UnityCG.cginc"
			
			sampler2D _MainTex;
			fixed4 _Color;

			struct vertexStruct
			{
				half4 vertex : POSITION;
				half2 texcoord : TEXCOORD0;
			};

			vertexStruct vert(vertexStruct v)
			{
				vertexStruct o;
				o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
				o.texcoord = v.texcoord;
				return o;
			}

			fixed4 frag(vertexStruct i) : COLOR
			{
				fixed4 col = tex2D(_MainTex, i.texcoord.xy) * _Color;
				
				col.rgb *= col.a;
    			col.a = 1;
				
				return col;
			}
			
			ENDCG
		} 
	}
}
